﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
    xmlns:Visifire_Commons_Controls="clr-namespace:Visifire.Commons.Controls;assembly=SLVisifire.Charts" x:Class="DIST.LR.ZHJG.Controls.Silverlight.Chart.Visifire.ucDoughnut"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
	<UserControl.Resources>
		<Style x:Key="ChartStyle1" TargetType="vc:Chart">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="vc:Chart">
						<Grid x:Name="RootElement" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" Margin="0,0,0,0" Opacity="{TemplateBinding Opacity}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
							<Grid x:Name="ShadowGrid" Margin="0,0,0,0" Canvas.ZIndex="0"/>
							<Border x:Name="ChartBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}" Height="{TemplateBinding Height}" Margin="0,0,0,0" Padding="{TemplateBinding Padding}" Width="{TemplateBinding Width}" Canvas.ZIndex="1">
								<Grid x:Name="ChartAreaGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Canvas.ZIndex="1">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="Auto"/>
										<ColumnDefinition/>
										<ColumnDefinition Width="Auto"/>
									</Grid.ColumnDefinitions>
									<Grid.RowDefinitions>
										<RowDefinition Height="Auto"/>
										<RowDefinition/>
										<RowDefinition Height="Auto"/>
									</Grid.RowDefinitions>
									<Rectangle x:Name="ChartLightingBorder" Grid.ColumnSpan="3" Grid.Column="0" Margin="0,0,0,0" Grid.Row="0" Grid.RowSpan="3" StrokeThickness="{TemplateBinding BorderThickness}" Visibility="Collapsed" Canvas.ZIndex="2">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#A0FFFFFF" Offset="0"/>
												<GradientStop Color="#00FFFFFF" Offset="1"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
									<StackPanel x:Name="TopOuterPanel" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Grid.Row="0" Canvas.ZIndex="4">
										<StackPanel x:Name="TopOuterTitlePanel" HorizontalAlignment="Stretch"/>
										<StackPanel x:Name="TopOuterLegendPanel" HorizontalAlignment="Stretch"/>
									</StackPanel>
									<StackPanel x:Name="BottomOuterPanel" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Grid.Row="2" Canvas.ZIndex="4">
										<StackPanel x:Name="BottomOuterLegendPanel"/>
										<StackPanel x:Name="BottomOuterTitlePanel"/>
									</StackPanel>
									<StackPanel x:Name="LeftOuterPanel" Grid.Column="0" Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Stretch" Canvas.ZIndex="4">
										<StackPanel x:Name="LeftOuterTitlePanel" Orientation="Horizontal"/>
										<StackPanel x:Name="LeftOuterLegendPanel" Orientation="Horizontal"/>
									</StackPanel>
									<StackPanel x:Name="RightOuterPanel" Grid.Column="2" Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Stretch" Canvas.ZIndex="4">
										<StackPanel x:Name="RightOuterLegendPanel" Orientation="Horizontal"/>
										<StackPanel x:Name="RightOuterTitlePanel" Orientation="Horizontal"/>
									</StackPanel>
									<Grid x:Name="CenterOuterGrid" Grid.Column="1" HorizontalAlignment="Stretch" Margin="0" Grid.Row="1" VerticalAlignment="Top" Canvas.ZIndex="3">
										<Grid.ColumnDefinitions>
											<ColumnDefinition Width="Auto"/>
											<ColumnDefinition/>
											<ColumnDefinition Width="Auto"/>
										</Grid.ColumnDefinitions>
										<Grid.RowDefinitions>
											<RowDefinition Height="Auto"/>
											<RowDefinition/>
											<RowDefinition Height="Auto"/>
										</Grid.RowDefinitions>
										<Grid x:Name="TopOffsetGrid" Grid.ColumnSpan="3" Grid.Column="0" HorizontalAlignment="Stretch" Grid.Row="0"/>
										<Grid x:Name="BottomOffsetGrid" Grid.ColumnSpan="3" Grid.Column="0" HorizontalAlignment="Stretch" Grid.Row="2"/>
										<Grid x:Name="LeftOffsetGrid" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" VerticalAlignment="Stretch"/>
										<Grid x:Name="RightOffsetGrid" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3" VerticalAlignment="Stretch"/>
										<Grid x:Name="CenterGrid" Grid.Column="1" HorizontalAlignment="Stretch" Margin="0" Grid.Row="1" VerticalAlignment="Stretch">
											<Grid.ColumnDefinitions>
												<ColumnDefinition Width="Auto"/>
												<ColumnDefinition/>
												<ColumnDefinition Width="Auto"/>
											</Grid.ColumnDefinitions>
											<Grid.RowDefinitions>
												<RowDefinition Height="Auto"/>
												<RowDefinition/>
												<RowDefinition Height="Auto"/>
											</Grid.RowDefinitions>
											<Grid x:Name="TopAxisGrid" Grid.Column="1" HorizontalAlignment="Left" Grid.Row="0" VerticalAlignment="Stretch">
												<StackPanel x:Name="TopAxisContainer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
													<StackPanel x:Name="TopAxisPanel"/>
													<Visifire_Commons_Controls:ZoomBar x:Name="TopAxisScrollBar" Height="17" MinHeight="0" Orientation="Horizontal" Visibility="Collapsed"/>
												</StackPanel>
											</Grid>
											<Grid x:Name="LeftAxisGrid" Grid.Column="0" HorizontalAlignment="Stretch" Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Stretch">
												<StackPanel x:Name="LeftAxisContainer" HorizontalAlignment="Stretch" Orientation="Horizontal" VerticalAlignment="Stretch">
													<StackPanel x:Name="LeftAxisPanel"/>
													<Visifire_Commons_Controls:ZoomBar x:Name="LeftAxisScrollBar" MinWidth="0" Orientation="Vertical" Visibility="Collapsed" VerticalAlignment="Top" Width="17"/>
												</StackPanel>
											</Grid>
											<Grid x:Name="RightAxisGrid" Grid.Column="2" HorizontalAlignment="Stretch" Grid.Row="1" Grid.RowSpan="2" VerticalAlignment="Stretch">
												<StackPanel x:Name="RightAxisContainer" HorizontalAlignment="Stretch" Orientation="Horizontal" VerticalAlignment="Stretch">
													<Visifire_Commons_Controls:ZoomBar x:Name="RightAxisScrollBar" MinWidth="0" Orientation="Vertical" Visibility="Collapsed" VerticalAlignment="Top" Width="17"/>
													<StackPanel x:Name="RightAxisPanel"/>
												</StackPanel>
											</Grid>
											<Grid x:Name="BottomAxisGrid" Grid.Column="1" HorizontalAlignment="Left" Grid.Row="2" VerticalAlignment="Stretch">
												<StackPanel x:Name="BottomAxisContainer" HorizontalAlignment="Stretch" Orientation="Vertical" VerticalAlignment="Stretch">
													<Visifire_Commons_Controls:ZoomBar x:Name="BottomAxisScrollBar" Height="17" MinHeight="0" Orientation="Horizontal" Visibility="Collapsed"/>
													<StackPanel x:Name="BottomAxisPanel"/>
												</StackPanel>
											</Grid>
											<Grid x:Name="CenterInnerGrid" Grid.Column="1" HorizontalAlignment="Stretch" Margin="0" Grid.Row="1" VerticalAlignment="Stretch">
												<Canvas x:Name="PlotAreaShadowCanvas" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Canvas.ZIndex="0"/>
												<Grid x:Name="PlotAreaGrid" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Canvas.ZIndex="0">
													<Canvas x:Name="PlotAreaScrollViewer" Margin="0">
														<Canvas x:Name="PlotCanvas">
															<Canvas x:Name="DrawingCanvas" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Canvas.ZIndex="1"/>
														</Canvas>
													</Canvas>
												</Grid>
												<Grid x:Name="InnerGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Canvas.ZIndex="1">
													<Grid.ColumnDefinitions>
														<ColumnDefinition Width="Auto"/>
														<ColumnDefinition/>
														<ColumnDefinition Width="Auto"/>
													</Grid.ColumnDefinitions>
													<Grid.RowDefinitions>
														<RowDefinition Height="Auto"/>
														<RowDefinition/>
														<RowDefinition Height="Auto"/>
													</Grid.RowDefinitions>
													<StackPanel x:Name="TopInnerPanel" Grid.ColumnSpan="3" Grid.Row="0">
														<StackPanel x:Name="TopInnerTitlePanel"/>
														<StackPanel x:Name="TopInnerLegendPanel"/>
													</StackPanel>
													<StackPanel x:Name="BottomInnerPanel" Grid.ColumnSpan="3" Grid.Row="2">
														<StackPanel x:Name="BottomInnerLegendPanel"/>
														<StackPanel x:Name="BottomInnerTitlePanel"/>
													</StackPanel>
													<StackPanel x:Name="LeftInnerPanel" Grid.Column="0" Orientation="Horizontal" Grid.Row="1">
														<StackPanel x:Name="LeftInnerTitlePanel" Orientation="Horizontal"/>
														<StackPanel x:Name="LeftInnerLegendPanel" Orientation="Horizontal"/>
													</StackPanel>
													<StackPanel x:Name="RightInnerPanel" Grid.Column="2" Orientation="Horizontal" Grid.Row="1">
														<StackPanel x:Name="RightInnerLegendPanel" Orientation="Horizontal"/>
														<StackPanel x:Name="RightInnerTitlePanel" Orientation="Horizontal"/>
													</StackPanel>
												</Grid>
											</Grid>
											<Canvas x:Name="ZoomAreaCanvas" Margin="0" Canvas.ZIndex="2">
												<Border x:Name="ZoomRectangle" BorderBrush="Black" Background="LightGray" CornerRadius="0" Opacity="0.4" Canvas.ZIndex="2"/>
											</Canvas>
										</Grid>
									</Grid>
								</Grid>
							</Border>
							<Canvas x:Name="BevelCanvas" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Canvas.ZIndex="2"/>
							<StackPanel x:Name="CenterDockInsidePlotAreaPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.ZIndex="3"/>
							<StackPanel x:Name="CenterDockOutsidePlotAreaPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.ZIndex="4"/>
							<Canvas x:Name="ToolTipCanvas" HorizontalAlignment="Left" Height="{TemplateBinding Height}" Margin="0,0,0,0" VerticalAlignment="Top" Width="{TemplateBinding Width}" Canvas.ZIndex="5"/>
							<Canvas x:Name="ElementCanvas" Canvas.ZIndex="5"/>
							<Border x:Name="LicenseInfoElement" Background="#ca5100" HorizontalAlignment="Stretch" Height="20" Visibility="Collapsed" VerticalAlignment="Top" Canvas.ZIndex="91000">
								<TextBlock Foreground="White" FontSize="14" HorizontalAlignment="Center" Text="You are using the trial version"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Padding" Value="6"/>
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderBrush" Value="Black"/>
			<Setter Property="BorderThickness" Value="0.5"/>
			<Setter Property="ToolTipEnabled" Value="true"/>
			<Setter Property="ColorSet" Value="Visifire1"/>
		</Style>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="White">
        <vc:Chart  Width="300" Height="300" Style="{StaticResource ChartStyle1}">

            <!--<vc:Chart.Titles>
                <vc:Title Text="Sales Distribution"/>
            </vc:Chart.Titles>-->

            <vc:Chart.Series>
            	<vc:DataSeries RenderAs="Doughnut"  LabelStyle="Inside" Bevel="False"  
            		LabelFontSize="14" LabelFontFamily="Verdana" LabelText="#YValue" ShowInLegend="False">
            		<vc:DataSeries.DataPoints>
            			<vc:DataPoint YValue="80"  LabelEnabled="False" LightingEnabled="False"    Color="#FF4789B4"/>
            			<vc:DataPoint YValue="20" LabelEnabled="False" LightingEnabled="False"  Color="#55CCCCCC"/>
            		</vc:DataSeries.DataPoints>
            	</vc:DataSeries>
            </vc:Chart.Series>
        </vc:Chart>
    </Grid>
</UserControl>
